package gxdlxy.zx2201;

public class Test {
    static double div(int a, int b) throws Exception {
        return a / b;
    }

    static void printArray(int[] arr) throws Exception {
        System.out.println("数组元素为");
        for (int i = 0; i < 6; i++)
            System.out.println(arr[i]);
    }

    public static void main(String[] args) {
//        int a = 4.5;  语法错误
        try {
            int[] arr = new int[]{1, 2, 3, 4, 5, 6};
            printArray(arr);

            double c = div(10, 0);
            System.out.println(c);
        }catch (Exception ex) {

        }
        System.out.println("程序正常退出成功");
    }
}
